<!--
  ~ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  ~
  ~ This file is part of retabel.
  ~
  ~ Copyright (c) 2011 by individual contributors as indicated by the
  ~ @author tags. See the copyright.txt file in the distribution
  ~ for a full listing of individual contributors.
  ~
  ~ This is free software; you can redistribute it and/or modify it
  ~ under the terms of the GNU Lesser General Public License as
  ~ published by the Free Software Foundation; either version 2.1 of
  ~ the License, or (at your option) any later version.
  ~
  ~ This software is distributed in the hope that it will be useful,
  ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
  ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  ~ Lesser General Public License for more details.
  ~
  ~ You should have received a copy of the GNU Lesser General Public
  ~ License along with this software; if not, write to the Free
  ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
  ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
  -->

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:c="http://java.sun.com/jstl/core"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:a4j="http://richfaces.org/a4j"
      xmlns:rich="http://richfaces.org/rich"
      xmlns:t="http://myfaces.apache.org/tomahawk">

<body>

<ui:composition template="/templates/template.xhtml">

    <ui:define name="title">
        <h:outputText value="#{_msg['retabel.text.title']}"/>
    </ui:define>

    <ui:define name="navigation">
        <ui:include src="navigation.xhtml"/>
    </ui:define>

    <ui:define name="body">


        <h:form enctype="multipart/form-data">

            <h:panelGrid columns="2">

               <h:outputLabel value="#{_msg['retabel.text.renderupload.data']}" for="data"/>
                        <h:panelGroup>
                            <h:inputText id="data" value="#{reportDesignUploadBean.packageName}" required="true">
                            </h:inputText>
                            <h:message for="data" errorClass="error"/>
                        </h:panelGroup>

                <h:outputLabel value="#{_msg['retabel.text.renderupload.config']}" for="config"/>
                        <h:panelGroup>
                            <h:inputText id="config" value="#{reportDesignUploadBean.packageName}" required="true">
                            </h:inputText>
                            <h:message for="config" errorClass="error"/>
                        </h:panelGroup>

                <h:outputLabel value="#{_msg['retabel.text.renderupload.file']}" for="uploadedFile"/>
                <t:inputFileUpload
                        id="uploadedFile"
                        size="40"
                        value="#{renderUploadBean.uploadedFile}"
                        storage="memory"
                        />

                <h:commandButton value="#{_msg['retabel.button.submit']}" action="#{renderUploadBean.uploadFile}"/>

            </h:panelGrid>

        </h:form>

        <h:dataTable var="_logLine" value="#{designUploadBean.logLines}">
            <h:column>
                <pre><h:outputText value="#{_logLine.message}"/></pre>
            </h:column>
            <h:column>
                <pre><h:outputText value="#{_logLine.throwable}"/></pre>
            </h:column>
        </h:dataTable>

    </ui:define>
</ui:composition>

</body>
</html>
